<template>
  <div class="page404">
    <div class="statusImg">
      <img :src="img_404" alt="404" />
    </div>
    <div class="statuesMsg">
      <h3>地址未找到，错误代码 404</h3>
      <p class="des">请求地址不存在，请检查您的网络</p>
      <div class="btns">
        <el-button type="primary" @click="backHome">返回</el-button>
      </div>
    </div>
  </div>
</template>

<script lang="ts" setup>
  import img_404 from '@/assets/images/httpStatus/404.png';
  import { useRouter } from 'vue-router';

  const router = useRouter();

  const backHome = () => router.back();
</script>

<style rel="stylesheet/scss" lang="less" scoped>
  .page404 {
    background: #f1f2f7;
    height: 100%;
    display: flex;
    align-items: center;
    flex-direction: row;
    justify-content: center;

    .statusImg {
      width: 40%;
      display: flex;
      align-items: center;
      justify-content: center;
      img {
        max-width: 100%;
        max-height: 100%;
      }
    }
    .statuesMsg {
      padding-left: 15px;
      h3 {
        color: var(--el-color-primary);
        font-size: 18px;
        font-weight: bold;
        margin-bottom: 12px;
      }
      .des {
        font-size: 14px;
        margin-bottom: 12px;
        color: #333333;
      }

      .btns {
        font-size: 14px;
      }
    }
  }
</style>
